resolve() {
    # This function takes a domain as input and returns the IP address.
    while IFS= read -r line; do
            dig +short "$line" 2> /dev/null | grep -E '^[0-9]+\.[0-9]+\.[0-9]+\.[0-9]+$' | head -n 1
    done
}
